*** REPLICATION FILE FOR "Power Sharing and Authoritarian Stability: How Rebel Regimes Solve the Guardianship Dilemma"
*** By Anne Meng and Jack Paine 


***Body of article

*********************************************
***TABLE 2. AUTHORITARIAN REGIME BREAKDOWN***
*********************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
reg fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, replace label nocon ///
keep(rebelregime)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, append label nocon ///
keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival, append label nocon tex(frag) ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Substantive magnitude
reg fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
margins, at(rebelregime=(0 1) regime_duration_main==0 main_spline1==0 main_spline2==0 main_spline3==0) post
reg fail_main rebelregime_collib rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
margins, at(rebelregime_collib=(0 1) rebelregime_cwwin=(0 1) regime_duration_main==0 main_spline1==0 main_spline2==0 main_spline3==0) post


*******************************
***TABLE 3. SUCCESSFUL COUPS***
*******************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
reg coup_success rebelregime ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, replace label nocon ///
keep (rebelregime)
reg coup_success rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg coup_success rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, append label nocon ///
keep(rebelregime ln_pop  al_ethnic relfrac col_br col_fr col_por)
reg coup_success rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por)
reg coup_success rebelregime_collib rebelregime_cwwin ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin)
reg coup_success rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg coup_success rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg coup_success rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_main, append label nocon tex(frag) ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por)


************************************
***TABLE 4. MINISTER OF DEFENSE APPOINTMENTS***
************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
reg defense_same rebelregime ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, replace label nocon keep(rebelregime)
reg defense_same rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg defense_same rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_same rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_same rebelregime_collib rebelregime_cwwin  ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, append label nocon
reg defense_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg defense_same rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
if sample==1, cluster(ccode)
outreg2 using powersharing_main, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag)


*******************************************************************
***TABLE 5. EFFECT OF MILITARY POWER SHARING WITHIN REBEL REGIMES***
*******************************************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
reg fail_main defense_same_avg ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using mechanism, replace label nocon ///
keep(defense_same_avg)
reg fail_main defense_same_avg ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using mechanism, append label nocon ///
keep(defense_same_avg ln_gdppc gdpgrowth ln_oilpop)
reg fail_main defense_same_avg ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using mechanism, append label nocon ///
keep(defense_same_avg ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main defense_same_avg ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using mechanism, append label nocon tex(frag) ///
keep(defense_same_avg ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)


*******************************************************************************
***FIGURE 1. DURATION OF LAUNCHING REBELLION AND MILITARY POWER SHARING IN REBEL REGIMES***
*******************************************************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
keep if rebelregime==1 & sample==1
keep defense_same_avg ln_war_duration gwf_casename rebelregime_collib rebelregime_cwwin
duplicates drop
graph twoway (scatter defense_same_avg ln_war_duration if rebelregime_collib==1, mlabel(gwf_casename) mlabcolor(black) mcolor(black) msymbol(O) sort) ///
(scatter defense_same_avg ln_war_duration if rebelregime_cwwin==1, mlabel(gwf_casename) mlabcolor(black) mcolor(black) msymbol(Oh) sort) ///
(lfit defense_same_avg ln_war_duration, lcolor(black)), graphregion(color(white)) legend(off) ///
xtitle("Duration of launching rebellion (logged)") ytitle("% years with same appointed defense minister") ylabel(0(.2)1) ///
yline(.3539446, lcolor(gray) lpattern(dash))
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/APSR R&R"
graph2tex, epsfile(scatter)


***Appendix

*****************************************************************
***TABLE B.1. SENSITIVITY TO UNOBSERVED COVARIATES FOR TABLE 2***
*****************************************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
reg fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BR = B[1,1]
reg fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BF1 = B[1,1]
gen S1 = BF1/(BR-BF1)
replace S1 = round(S1,.1)
reg fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BF2 = B[1,1]
gen S2 = BF2/(BR-BF2)
replace S2 = round(S2,.1)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BF3 = B[1,1]
gen S3 = BF3/(BR-BF3)
replace S3 = round(S3,.1)
reg fail_main rebelregime_collib rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BR1 = B[1,1]
gen BR2 = B[1,2]
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BF4 = B[1,1]
gen S4 = BF4/(BR1-BF4)
gen BF5 = B[1,2]
gen S5 = BF5/(BR2-BF5)
replace S4 = round(S4,.1)
replace S5 = round(S5,.1)
reg fail_main rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BF6 = B[1,1]
gen S6 = BF6/(BR1-BF6)
gen BF7 = B[1,2]
gen S7 = BF7/(BR2-BF7)
replace S6 = round(S6,.1)
replace S7 = round(S7,.1)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
matrix B = e(b)
gen BF8 = B[1,1]
gen S8 = BF8/(BR1-BF8)
gen BF9 = B[1,2]
gen S9 = BF9/(BR2-BF9)
replace S8 = round(S8,.1)
replace S9 = round(S9,.1)
*All rebel regimes
list S1 S2 S3 if country=="Angola" & year==1980
*Liberation regimes
list S4 S6 S8 if country=="Angola" & year==1980
*Civil war winners
list S5 S7 S9 if country=="Angola" & year==1980

*Jackknife
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use dataset_apsr.dta, clear
gen number=_n
gen ccode_reg=.
gen jack_rebelregime=.
gen jack_liberation=.
gen jack_notlib=.
foreach i of numlist 1/50 {
	reg fail_main rebelregime ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_rebelregime=`t' if number==`i'
	summarize ccode if country_number==`i'
	replace ccode_reg=r(max) if number==`i'
	reg fail_main rebelregime_collib rebelregime_cwwin ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_liberation=`t' if number==`i'
	local t = A[4,2]
	replace jack_notlib=`t' if number==`i'
    }
foreach i of numlist 1/50 {
	reg fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_rebelregime=`t' if number==`i'+50
	summarize ccode if country_number==`i'
	replace ccode_reg=r(max) if number==`i'+50
	reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_liberation=`t' if number==`i'+50
	local t = A[4,2]
	replace jack_notlib=`t' if number==`i'+50
    }
foreach i of numlist 1/50 {
	reg fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_rebelregime=`t' if number==`i'+100
	summarize ccode if country_number==`i'
	replace ccode_reg=r(max) if number==`i'+100
	reg fail_main rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_liberation=`t' if number==`i'+100
	local t = A[4,2]
	replace jack_notlib=`t' if number==`i'+100
    }
foreach i of numlist 1/50 {
	reg fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_rebelregime=`t' if number==`i'+150
	summarize ccode if country_number==`i'
	replace ccode_reg=r(max) if number==`i'+150
	reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
	mat A=r(table)
	local t = A[4,1]
	replace jack_liberation=`t' if number==`i'+150
	local t = A[4,2]
	replace jack_notlib=`t' if number==`i'+150
    }
gen country_reg=""
replace country_reg="Cape Verde" if ccode_reg==402
replace country_reg="Guinea-Bissau" if ccode_reg==404
replace country_reg="Equatorial Guinea" if ccode_reg==411
replace country_reg="Gambia" if ccode_reg==420
replace country_reg="Mali" if ccode_reg==432
replace country_reg="Senegal" if ccode_reg==433
replace country_reg="Benin" if ccode_reg==434
replace country_reg="Mauritania" if ccode_reg==435
replace country_reg="Niger" if ccode_reg==436
replace country_reg="Ivory Coast" if ccode_reg==437
replace country_reg="Guinea" if ccode_reg==438
replace country_reg="Burkina Faso" if ccode_reg==439
replace country_reg="Liberia" if ccode_reg==450
replace country_reg="Sierra Leone" if ccode_reg==451
replace country_reg="Ghana" if ccode_reg==452
replace country_reg="Togo" if ccode_reg==461
replace country_reg="Cameroon" if ccode_reg==471
replace country_reg="Nigeria" if ccode_reg==475
replace country_reg="Gabon" if ccode_reg==481
replace country_reg="Central African Republic" if ccode_reg==482
replace country_reg="Chad" if ccode_reg==483
replace country_reg="Congo Brazzaville" if ccode_reg==484
replace country_reg="Congo Kinshasa" if ccode_reg==490
replace country_reg="Uganda" if ccode_reg==500
replace country_reg="Kenya" if ccode_reg==501
replace country_reg="Tanzania" if ccode_reg==510
replace country_reg="Burundi" if ccode_reg==516
replace country_reg="Rwanda" if ccode_reg==517
replace country_reg="Somalia" if ccode_reg==520
replace country_reg="Djibouti" if ccode_reg==522
replace country_reg="Ethiopia" if ccode_reg==530
replace country_reg="Eritrea" if ccode_reg==531
replace country_reg="Angola" if ccode_reg==540
replace country_reg="Mozambique" if ccode_reg==541
replace country_reg="Zambia" if ccode_reg==551
replace country_reg="Zimbabwe" if ccode_reg==552
replace country_reg="Malawi" if ccode_reg==553
replace country_reg="South Africa" if ccode_reg==560
replace country_reg="Namibia" if ccode_reg==565
replace country_reg="Lesotho" if ccode_reg==570
replace country_reg="Botswana" if ccode_reg==571
replace country_reg="Swaziland" if ccode_reg==572
replace country_reg="Madagascar" if ccode_reg==580
replace country_reg="Comoros" if ccode_reg==581
replace country_reg="Mauritius" if ccode_reg==590
replace country_reg="Morocco" if ccode_reg==600
replace country_reg="Algeria" if ccode_reg==615
replace country_reg="Tunisia" if ccode_reg==616
replace country_reg="Libya" if ccode_reg==620
replace country_reg="Sudan" if ccode_reg==625
replace country_reg="South Sudan" if ccode_reg==626
summarize jack_rebelregime if jack_rebelregime<.01	
summarize jack_rebelregime if jack_rebelregime<.05
summarize jack_rebelregime if jack_rebelregime<.1	
summarize jack_liberation if jack_liberation<.01
summarize jack_liberation if jack_liberation<.05
summarize jack_liberation if jack_liberation<.1
summarize jack_notlib if jack_notlib<.01
summarize jack_notlib if jack_notlib<.05
summarize jack_notlib if jack_notlib<.1
list country_reg number jack_rebelregime if jack_rebelregime>.1 & jack_rebelregime!=.
list country_reg number jack_liberation if jack_liberation>.1 & jack_liberation!=.
list country_reg number jack_notlib if jack_notlib>.1 & jack_notlib!=.


************************************
***TABLE B.2. ALTERNATIVE SAMPLES***
************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Smaller sample (lower threshold for democracy)
reg fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, replace label nocon ///
keep(rebelregime)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, append label nocon ///
keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & gwf_nonautocracy!="democracy", cluster(ccode)
outreg2 using smallsample, append label nocon tex(frag) ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Panel B. Larger sample (all post-independence years)
reg fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, replace label nocon ///
keep(rebelregime)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, append label nocon ///
keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3, cluster(ccode)
outreg2 using fullsample, append label nocon tex(frag) ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)


*****************************************************
***TABLE B.3. SAMPLE WITHOUT REVOLUTIONARY REGIMES***
*****************************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Levitsky and Way
reg fail_main rebelregime_lw ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_lw, replace label nocon keep(rebelregime_lw)
reg fail_main rebelregime_lw ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_lw, append label nocon keep(rebelregime_lw ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_lw ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_lw, append label nocon keep(rebelregime_lw ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_lw ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_lw, append label nocon keep(rebelregime_lw ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por) tex(frag)
*Panel B. Colgan and Weeks
reg fail_main rebelregime_cw ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_cw, replace label nocon keep(rebelregime_cw)
reg fail_main rebelregime_cw ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_cw, append label nocon keep(rebelregime_cw ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_cw ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_cw, append label nocon keep(rebelregime_cw ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_cw ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_cw, append label nocon keep(rebelregime_cw ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por) tex(frag)
*Panel C. Roessler and Verhoeven
reg fail_main rebelregime_rv ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_rv, replace label nocon keep(rebelregime_rv)
reg fail_main rebelregime_rv ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_rv, append label nocon keep(rebelregime_rv ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_rv ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_rv, append label nocon keep(rebelregime_rv ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_rv ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using sample_rv, append label nocon keep(rebelregime_rv ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por) tex(frag)


**********************************************
***TABLE B.4. ROBUSTNESS CHECKS FOR TABLE 2***
**********************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Logit models
logit fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) replace label nocon keep(rebelregime)
logit fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
logit fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
logit fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
logit fail_main rebelregime_collib rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) append label nocon keep(rebelregime_collib rebelregime_cwwin)
logit fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) append label nocon keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
logit fail_main rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) append label nocon keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
logit fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using survival_logit, addstat(Pseudo R2, e(r2_p)) append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Panel B. Sample: coercive-origins regimes only
reg fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, replace label nocon keep(rebelregime)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using survival_coercive, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)


**************************************************
***TABLE B.5. INSTRUMENTAL VARIABLE REGRESSIONS***
**************************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. 2SLS
ivreg fail_main (rebelregime=ln_potential_settlement) ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv, replace label nocon keep(rebelregime)
ivreg fail_main (rebelregime=ln_potential_settlement) col_br col_fr col_por pd1800 pcs rugged yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv, append label nocon keep(rebelregime col_br col_fr col_por pd1800 pcs rugged)
ivreg fail_main (rebelregime_collib=ln_potential_settlement) rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv, append label nocon keep(rebelregime_collib rebelregime_cwwin)
ivreg fail_main (rebelregime_collib=ln_potential_settlement) rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged)
*Panel B. First stage
reg rebelregime ln_potential_settlement ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_first, replace label nocon keep(ln_potential_settlement)
reg rebelregime ln_potential_settlement col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_first, append label nocon keep(ln_potential_settlement col_br col_fr col_por pd1800 pcs rugged)
reg rebelregime_collib ln_potential_settlement rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_first, append label nocon keep(ln_potential_settlement rebelregime_cwwin)
reg rebelregime_collib ln_potential_settlement rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_first, append label nocon tex(frag) keep(ln_potential_settlement rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged)
*F-tests
reg rebelregime ln_potential_settlement ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
test ln_potential_settlement
gen F1 = r(F)
replace F1 = round(F1,.1)
reg rebelregime ln_potential_settlement col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
test ln_potential_settlement
gen F2 = r(F)
replace F2 = round(F2,.1)
reg rebelregime_collib ln_potential_settlement rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
test ln_potential_settlement
gen F3 = r(F)
replace F3 = round(F3,.1)
reg rebelregime_collib ln_potential_settlement rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
test ln_potential_settlement
gen F4 = r(F)
replace F4 = round(F4,.1)
list F1 F2 F3 F4 if country=="Angola" & year==1980
drop F1 F2 F3 F4
*Panel C. Reduced form
reg gwf_fail ln_potential_settlement ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_reduced, replace label nocon keep(ln_potential_settlement)
reg gwf_fail ln_potential_settlement col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_reduced, append label nocon keep(ln_potential_settlement col_br col_fr col_por pd1800 pcs rugged)
reg gwf_fail ln_potential_settlement rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_reduced, append label nocon keep(ln_potential_settlement rebelregime_collib rebelregime_cwwin)
reg gwf_fail ln_potential_settlement rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using iv_reduced, append label nocon tex(frag) keep(ln_potential_settlement rebelregime_collib rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged)


**************************************************************************
***TABLE B.6. ASSESSING SENSITIVITY TO EXCLUSION RESTRICTION VIOLATIONS***
**************************************************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
*Add uci.ado file to the folder with the STATA .do file
use Meng_Paine_APSR_data.dta, clear
gen pvalue = .
gen delta95_1 = .
gen delta90_1 = .
gen delta95_2 = .
gen delta90_2 = .
gen delta95_3 = .
gen delta90_3 = .
gen delta95_4 = .
gen delta90_4 = .
gen coef_1 = .
gen coef_2 = .
gen coef_3 = .
gen coef_4 = .
gen percent95_1 = .
gen percent95_2 = .
gen percent95_3 = .
gen percent95_4 = .
gen percent90_1 = .
gen percent90_2 = .
gen percent90_3 = .
gen percent90_4 = .
foreach i of numlist -.003(.0001)0 {
	uci fail_main (rebelregime=ln_potential_settlement) ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode) ///
	inst(ln_potential_settlement) g1min(`i') g1max(`i') grid(2) level(.95)
	matrix G = r(table)	
	replace pvalue = G[4,1]
	replace delta95_1 = `i' if pvalue<0.05 & delta95_1==.
	replace delta90_1 = `i' if pvalue<0.1 & delta90_1==.
    }	
foreach i of numlist -.003(.0001)0 {
	uci fail_main (rebelregime=ln_potential_settlement) col_br col_fr col_por pd1800 pcs rugged yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode) ///
	inst(ln_potential_settlement) g1min(`i') g1max(`i') grid(2) level(.95)
	matrix G = r(table)	
	replace pvalue = G[4,1]
	replace delta95_2 = `i' if pvalue<0.05 & delta95_2==.
	replace delta90_2 = `i' if pvalue<0.1 & delta90_2==.
    }	
foreach i of numlist -.003(.0001)0 {
	uci fail_main (rebelregime_collib=ln_potential_settlement) rebelregime_cwwin ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode) ///
	inst(ln_potential_settlement) g1min(`i') g1max(`i') grid(2) level(.95)
	matrix G = r(table)	
	replace pvalue = G[4,1]
	replace delta95_3 = `i' if pvalue<0.05 & delta95_3==.
	replace delta90_3 = `i' if pvalue<0.1 & delta90_3==.
    }	
foreach i of numlist -.003(.0001)0 {
	uci fail_main (rebelregime_collib=ln_potential_settlement) rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged yearfe* ///
	regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode) ///
	inst(ln_potential_settlement) g1min(`i') g1max(`i') grid(2) level(.95)
	matrix G = r(table)	
	replace pvalue = G[4,1]
	replace delta95_4 = `i' if pvalue<0.05 & delta95_4==.
	replace delta90_4 = `i' if pvalue<0.1 & delta90_4==.
    }	
reg fail_main ln_potential_settlement ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
replace coef_1 = _b[ln_potential_settlement]
reg fail_main ln_potential_settlement col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
replace coef_2 = _b[ln_potential_settlement]
reg fail_main ln_potential_settlement rebelregime_cwwin ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
replace coef_3 = _b[ln_potential_settlement]
reg fail_main ln_potential_settlement rebelregime_cwwin col_br col_fr col_por pd1800 pcs rugged ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
replace coef_4 = _b[ln_potential_settlement]
replace percent95_1 = delta95_1/coef_1
replace percent95_1 = 100*round(percent95_1,.01)
replace percent95_2 = delta95_2/coef_2
replace percent95_2 = 100*round(percent95_2,.01)
replace percent95_3 = delta95_3/coef_3
replace percent95_3 = 100*round(percent95_3,.01)
replace percent95_4 = delta95_4/coef_4
replace percent95_4 = 100*round(percent95_4,.01)
replace percent90_1 = delta90_1/coef_1
replace percent90_1 = 100*round(percent90_1,.01)
replace percent90_2 = delta90_2/coef_2
replace percent90_2 = 100*round(percent90_2,.01)
replace percent90_3 = delta90_3/coef_3
replace percent90_3 = 100*round(percent90_3,.01)
replace percent90_4 = delta90_4/coef_4
replace percent90_4 = 100*round(percent90_4,.01)
list delta95_1 delta95_2 delta95_3 delta95_4 if country=="Algeria" & year==1980
list percent95_1 percent95_2 percent95_3 percent95_4 if country=="Algeria" & year==1980
list delta90_1 delta90_2 delta90_3 delta90_4 if country=="Algeria" & year==1980
list percent90_1 percent90_2 percent90_3 percent90_4 if country=="Algeria" & year==1980
drop pvalue delta95_1 delta95_2 delta95_3 delta95_4 /// 
percent95_1 percent95_2 percent95_3 percent95_4 ///
delta90_1 delta90_2 delta90_3 delta90_4 ///
percent90_1 percent90_2 percent90_3 percent90_4 ///
coef_1 coef_2 coef_3 coef_4


**********************************************
***TABLE B.7. ROBUSTNESS CHECKS FOR TABLE 3***
**********************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Logit
logit coup_success rebelregime ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, replace label nocon ///
keep(rebelregime) addstat(Pseudo R2, e(r2_p))
logit coup_success rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) addstat(Pseudo R2, e(r2_p))
logit coup_success rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, append label nocon ///
keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por) addstat(Pseudo R2, e(r2_p))
logit coup_success rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, append label nocon ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) addstat(Pseudo R2, e(r2_p))
logit coup_success rebelregime_collib rebelregime_cwwin ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin) addstat(Pseudo R2, e(r2_p))
logit coup_success rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop) addstat(Pseudo R2, e(r2_p))
logit coup_success rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, append label nocon ///
keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) addstat(Pseudo R2, e(r2_p))
logit coup_success rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using coups_logit, append label nocon tex(frag) ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por ) addstat(Pseudo R2, e(r2_p))
*Panel B. Coercive-origins regimes only
reg coup_success rebelregime ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, replace label nocon keep(rebelregime)
reg coup_success rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg coup_success rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg coup_success rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg coup_success rebelregime_collib rebelregime_cwwin ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg coup_success rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg coup_success rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg coup_success rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1 & rebelregime+coup_regime==1, cluster(ccode)
outreg2 using coups_conflict, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag)


*********************************************
***TABLE B.8. DEFENSE MINISTER APPOINTMENT***
*********************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
reg defense_appt rebelregime ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, replace label nocon keep(rebelregime)
reg defense_appt rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg defense_appt rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_appt rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_appt rebelregime_collib rebelregime_cwwin  ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, append label nocon
reg defense_appt rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg defense_appt rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_appt rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
if sample==1, cluster(ccode)
outreg2 using defenseappoint, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag)


**********************************************
***TABLE B.9. ROBUSTNESS CHECKS FOR TABLE 4***
**********************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Logit
logit defense_same rebelregime ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
replace label nocon keep(rebelregime) addstat(Pseudo R2, e(r2_p))
logit defense_same rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon addstat(Pseudo R2, e(r2_p))
logit defense_same rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por ) append label nocon addstat(Pseudo R2, e(r2_p))
logit defense_same rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon addstat(Pseudo R2, e(r2_p))
logit defense_same rebelregime_collib rebelregime_cwwin  ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
append label nocon addstat(Pseudo R2, e(r2_p)) keep(rebelregime_collib rebelregime_cwwin)
logit defense_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop) append label nocon addstat(Pseudo R2, e(r2_p))
logit defense_same rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon addstat(Pseudo R2, e(r2_p))
logit defense_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
if sample==1, cluster(ccode)
outreg2 using powersharing_logit, ///
keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag) addstat(Pseudo R2, e(r2_p))
*Panel B. Coercive-origins regimes only
reg defense_same rebelregime ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, replace label nocon keep(rebelregime)
reg defense_same rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg defense_same rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_same rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg defense_same rebelregime_collib rebelregime_cwwin  ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg defense_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop ) append label nocon
reg defense_same rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por ) append label nocon
reg defense_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
if sample==1, cluster(ccode)
outreg2 using powersharing_coercive, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag)


********************************************
***TABLE C.1. CONTROLLING THE COUNTRYSIDE***
********************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. V-Dem core civil society index
reg v2x_cspart rebelregime if sample==1, cluster(ccode)
outreg2 using civilsoc, replace label nocon keep(rebelregime)
reg v2x_cspart rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using civilsoc, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg v2x_cspart rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using civilsoc, append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg v2x_cspart rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using civilsoc, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg v2x_cspart rebelregime_collib rebelregime_cwwin if sample==1, cluster(ccode)
outreg2 using civilsoc, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg v2x_cspart rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using civilsoc, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg v2x_cspart rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using civilsoc, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg v2x_cspart rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using civilsoc, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Panel B. Adjusted BTI stateness
reg bertel_average rebelregime if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, replace label nocon keep(rebelregime)
reg bertel_average rebelregime ln_gdppc gdpgrowth ln_oilpop if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg bertel_average rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg bertel_average rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg bertel_average rebelregime_collib rebelregime_cwwin if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg bertel_average rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg bertel_average rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg bertel_average rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por if year==2006 & sample==1, cluster(ccode)
outreg2 using countryside, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Panel C. Counterrevolutions
reg fail_main reb_counter reb_nocounter ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_a, replace label nocon  ///
keep(reb_counter reb_nocounter)
reg fail_main reb_counter reb_nocounter ln_gdppc gdpgrowth ln_oilpop yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_a, append label nocon  ///
keep(reb_counter reb_nocounter ln_gdppc gdpgrowth ln_oilpop )
reg fail_main reb_counter reb_nocounter ln_pop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_a, append label nocon  ///
keep(reb_counter reb_nocounter ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main reb_counter reb_nocounter ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_a, append label nocon  ///
keep(reb_counter reb_nocounter ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por ) tex(frag)



**************************************
***TABLE C.2. AUTHORITARIAN PARTIES***
**************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
reg fail_main rebelregime ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & inheritparty==1, cluster(ccode)
outreg2 using party, replace label nocon keep(rebelregime)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & inheritparty==1, cluster(ccode)
outreg2 using party, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & inheritparty==1, cluster(ccode)
outreg2 using party, append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & inheritparty==1, cluster(ccode)
outreg2 using party, append label nocon tex(frag) keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)


*****************************************
***TABLE C.3. OTHER PARTY EXPLANATIONS***
*****************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Party control of military
reg partymilit rebelregime if sample==1, cluster(ccode)
outreg2 using partymilit, replace label nocon keep(rebelregime)
reg partymilit rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using partymilit, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg partymilit rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using partymilit, append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg partymilit rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using partymilit, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg partymilit rebelregime_collib rebelregime_cwwin if sample==1, cluster(ccode)
outreg2 using partymilit, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg partymilit rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using partymilit, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg partymilit rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using partymilit, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg partymilit rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using partymilit, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Panel B. Commissar system
reg commissar rebelregime if sample==1, cluster(ccode)
outreg2 using commissar, replace label nocon keep(rebelregime)
reg commissar rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using commissar, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg commissar rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using commissar, append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg commissar rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using commissar, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg commissar rebelregime_collib rebelregime_cwwin if sample==1, cluster(ccode)
outreg2 using commissar, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg commissar rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using commissar, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg commissar rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using commissar, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg commissar rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using commissar, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Panel C. Paramilitaries
reg pcount rebelregime if sample==1, cluster(ccode)
outreg2 using pcount, replace label nocon keep(rebelregime)
reg pcount rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using pcount, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_oilpop)
reg pcount rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using pcount, append label nocon keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por)
reg pcount rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using pcount, append label nocon keep(rebelregime ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg pcount rebelregime_collib rebelregime_cwwin if sample==1, cluster(ccode)
outreg2 using pcount, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg pcount rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using pcount, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop)
reg pcount rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using pcount, append label nocon keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por)
reg pcount rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using pcount, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)


**************************************
***TABLE C.4. CIVILIAN POWERSHARING***
**************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. VP/PM same
reg second_same rebelregime if sample==1, cluster(ccode)
outreg2 using second_same, replace label nocon keep(rebelregime)
reg second_same rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using second_same, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg second_same rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_same, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg second_same rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_same, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por)  append label nocon
reg second_same rebelregime_collib rebelregime_cwwin, cluster(ccode)
outreg2 using second_same if sample==1, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg second_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using second_same, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop) append label nocon
reg second_same rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_same, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg second_same rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_same, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag)
*Panel B. VP/PM appoint
reg second_appt rebelregime if sample==1, cluster(ccode)
outreg2 using second_appt, replace label nocon keep(rebelregime)
reg second_appt rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using second_appt, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg second_appt rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_appt, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por ) append label nocon
reg second_appt rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_appt, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg second_appt rebelregime_collib rebelregime_cwwin if sample==1, cluster(ccode)
outreg2 using second_appt, append label nocon keep(rebelregime_collib rebelregime_cwwin)
reg second_appt rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using second_appt, keep(rebelregime_collib rebelregime_cwwin rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop ) append label nocon
reg second_appt rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_appt, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg second_appt rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using second_appt, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag)


************************************
***TABLE C.5. ETHNIC POWERSHARING***
************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Ethnic representation
reg legippop rebelregime if sample==1, cluster(ccode)
outreg2 using epr, keep(rebelregime) replace label nocon
reg legippop rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using epr, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg legippop rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using epr, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por ) append label nocon
reg legippop rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using epr, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg legippop rebelregime_collib rebelregime_cwwin if sample==1, cluster(ccode)
outreg2 using epr, append label nocon
reg legippop rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using epr, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop) append label nocon
reg legippop rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using epr, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg legippop rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using epr, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por ) append label nocon tex(frag)
*Panel B. Ethnocracy
reg ethnocracy rebelregime if sample==1, cluster(ccode)
outreg2 using ethnocracy, keep(rebelregime) replace label nocon
reg ethnocracy rebelregime ln_gdppc gdpgrowth ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using ethnocracy, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop) append label nocon
reg ethnocracy rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using ethnocracy, keep(rebelregime ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg ethnocracy rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using ethnocracy, keep(rebelregime ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg ethnocracy rebelregime_collib rebelregime_cwwin if sample==1, cluster(ccode)
outreg2 using ethnocracy,  keep(rebelregime_collib rebelregime_cwwin) append label nocon
reg ethnocracy rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop yearfe* if sample==1, cluster(ccode)
outreg2 using ethnocracy, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth  ln_oilpop) append label nocon
reg ethnocracy rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using ethnocracy, keep(rebelregime_collib rebelregime_cwwin ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon
reg ethnocracy rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* if sample==1, cluster(ccode)
outreg2 using ethnocracy, keep(rebelregime_collib rebelregime_cwwin ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por) append label nocon tex(frag)

*****************************************************
***TABLE C.7. CONTROLLING FOR ETHNIC POWER SHARING***
*****************************************************
*Panel A. DV: Authoritarian Regime Breakdown
reg fail_main rebelregime legippop regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, replace label nocon keep(rebelregime legippop)
reg fail_main rebelregime legippop ln_gdppc gdpgrowth ln_oilpop yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, append label nocon keep(rebelregime legippop ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime legippop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, append label nocon keep(rebelregime legippop ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime legippop ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, append label nocon keep(rebelregime legippop ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin legippop regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, append label nocon keep(rebelregime_collib rebelregime_cwwin legippop)
reg fail_main rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_oilpop yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, append label nocon keep(rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_collib rebelregime_cwwin legippop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, append label nocon keep(rebelregime_collib rebelregime_cwwin legippop ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic1, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)
*Panel B. DV: Successful Coups
reg coup_success rebelregime legippop regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, replace label nocon keep (rebelregime legippop)
reg coup_success rebelregime legippop ln_gdppc gdpgrowth ln_oilpop yearfe* regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, append label nocon keep(rebelregime legippop ln_gdppc gdpgrowth ln_oilpop)
reg coup_success rebelregime legippop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, append label nocon keep(rebelregime legippop ln_pop  al_ethnic relfrac col_br col_fr col_por)
reg coup_success rebelregime legippop ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, append label nocon keep(rebelregime legippop ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por)
reg coup_success rebelregime_collib rebelregime_cwwin legippop regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, append label nocon keep(rebelregime_collib rebelregime_cwwin legippop)
reg coup_success rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_oilpop yearfe* regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, append label nocon keep(rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_oilpop)
reg coup_success rebelregime_collib rebelregime_cwwin legippop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, append label nocon keep(rebelregime_collib rebelregime_cwwin legippop ln_pop al_ethnic relfrac col_br col_fr col_por)
reg coup_success rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_coup coup_spline1 coup_spline2 coup_spline3 if sample==1, cluster(ccode)
outreg2 using ethnic2, append label nocon tex(frag) keep(rebelregime_collib rebelregime_cwwin legippop ln_gdppc gdpgrowth ln_oilpop ln_pop al_ethnic relfrac col_br col_fr col_por)
*Panel C. Sample: Rebel Regimes, DV: Authoritarian Breakdown
reg fail_main defense_same_avg legippop regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using ethnic3, replace label nocon keep(defense_same_avg legippop)
reg fail_main defense_same_avg legippop ln_gdppc gdpgrowth ln_oilpop yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using ethnic3, append label nocon keep(defense_same_avg legippop ln_gdppc gdpgrowth ln_oilpop)
reg fail_main defense_same_avg legippop ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using ethnic3, append label nocon keep(defense_same_avg legippop ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main defense_same_avg legippop ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe* regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1 & rebelregime==1, cluster(ccode)
outreg2 using ethnic3, append label nocon tex(frag) keep(defense_same_avg legippop ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por)

**********************************************
***TABLE C.8. ALTERNATIVE CIVIL WAR FACTORS***
**********************************************
cd "/Users/jackpaine/Dropbox/Current papers/Revolutionary regimes/Our data"
use Meng_Paine_APSR_data.dta, clear
*Panel A. Mode of victory for rebel regimes
reg fail_main reb_outright reb_settlement  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_b, replace label nocon  ///
keep(reb_outright reb_settlement)
reg fail_main reb_outright reb_settlement ln_gdppc gdpgrowth ln_oilpop yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_b, append label nocon  ///
keep(reb_outright reb_settlement ln_gdppc gdpgrowth ln_oilpop)
reg fail_main reb_outright reb_settlement ln_pop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_b, append label nocon  ///
keep(reb_outright reb_settlement ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main reb_outright reb_settlement ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_b, append label nocon  ///
keep(reb_outright reb_settlement ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por) tex(frag)
*Panel B. General civil war termination
reg fail_main rebvictory govvictory settlement  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_c, replace label nocon  ///
keep(rebvictory govvictory settlement)
reg fail_main rebvictory govvictory settlement ln_gdppc gdpgrowth ln_oilpop yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_c, append label nocon  ///
keep(rebvictory govvictory settlement ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebvictory govvictory settlement ln_pop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_c, append label nocon  ///
keep(rebvictory govvictory settlement ln_pop al_ethnic relfrac col_br col_fr col_por )
reg fail_main rebvictory govvictory settlement ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_c, append label nocon  ///
keep(rebvictory govvictory settlement ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por) tex(frag)
*Panel C. Origins in Cold War vs. Post
reg fail_main rebelregime_coldwar rebelregime_post  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_d, replace label nocon  ///
keep(rebelregime_coldwar rebelregime_post)
reg fail_main rebelregime_coldwar rebelregime_post ln_gdppc gdpgrowth ln_oilpop yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_d, append label nocon ///
keep(rebelregime_coldwar rebelregime_post ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime_coldwar rebelregime_post ln_pop al_ethnic relfrac col_br col_fr col_por yearfe* ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_d, append label nocon ///
keep(rebelregime_coldwar rebelregime_post ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime_coldwar rebelregime_post ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por yearfe*  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_d, append label nocon  ///
keep(rebelregime_coldwar rebelregime_post ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por) tex(frag)
*Panel D. Additional civil war covariates
reg fail_main rebelregime coldwar ln_refugees fl_war foreign_imposed ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_e, replace label nocon  ///
keep(rebelregime coldwar ln_refugees fl_war foreign_imposed)
reg fail_main rebelregime coldwar ln_refugees fl_war foreign_imposed ln_gdppc gdpgrowth ln_oilpop  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_e, append label nocon  ///
keep(rebelregime coldwar ln_refugees fl_war foreign_imposed ln_gdppc gdpgrowth ln_oilpop)
reg fail_main rebelregime coldwar ln_refugees fl_war foreign_imposed ln_pop al_ethnic relfrac col_br col_fr col_por  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_e, append label nocon  ///
keep(rebelregime coldwar ln_refugees fl_war foreign_imposed ln_pop al_ethnic relfrac col_br col_fr col_por)
reg fail_main rebelregime coldwar ln_refugees fl_war foreign_imposed ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por  ///
regime_duration_main main_spline1 main_spline2 main_spline3 if sample==1, cluster(ccode)
outreg2 using altcw_e, append label nocon  ///
keep(rebelregime coldwar ln_refugees fl_war foreign_imposed ln_gdppc gdpgrowth ln_pop ln_oilpop al_ethnic relfrac col_br col_fr col_por ) tex(frag)
